#include <QGraphicsLineItem>
#include <QPen>

#ifndef LINK_H
#define LINK_H
class Node;

class  Link : public QGraphicsLineItem
{
public:
  Link(Node *fromNode, Node *toNode);
  ~Link();
  
  Node *fromNode() const { return myFromNode; }
  Node *toNode() const { return myToNode; }
  
  void setColor(const QColor &color);
  QColor color() const { return pen().color(); }
  
  void trackNodes();

private:
  Node *myFromNode;
  Node *myToNode;
};
#endif

